#ifndef COMPONENTNODE_H__
#define COMPONENTNODE_H__

//include header
#include "Component.h"
#include <vector>

//using namespace
using namespace std;


namespace npComposite
{
    //class predeclaration

    class ComponentNode : public Component // class inheritance
    {
        //friend
        
        //embedded type
        
        public: ComponentNode();
        public: virtual ~ComponentNode();
        public: ComponentNode(const ComponentNode& cpy);
        public: ComponentNode& operator=(const ComponentNode& asn);
        public: virtual ComponentNode* clone() const;

        //other constructors
        public: ComponentNode(string name);

        //public methods
        public: virtual void add(Component* component);
        public: virtual void remove(Component* component);
        public: virtual void display(int depth);

        //protected methods

        //private methods

        //protected data

        //private data
        private: vector<Component*> components;
    };
} // namespace npComposite


#endif //COMPONENTNODE_H__
